package com.ssy.lingxi.platform.template.service.repository;

import com.ssy.lingxi.platform.template.service.entity.adorn.PageTemplateFirstCategory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lqa
 * @version 2.0.0
 * @date 2021/11/11
 */
@Repository
public interface PageTemplateFirstCategoryRepository extends JpaRepository<PageTemplateFirstCategory, Long> {
    List<PageTemplateFirstCategory> findAllByShopIdAndTemplateId(Long shopId, Long templateId);

    PageTemplateFirstCategory findByTemplateIdAndCategoryId(Long templateId, Long categoryId);

    List<PageTemplateFirstCategory> findAllByCategoryId(Long categoryId);
}
